package com.piggy.logi.sys.api;

import com.piggy.common.core.constant.SecurityConstants;
import com.piggy.common.core.constant.ServiceNameConstants;
import com.piggy.logi.sys.api.domain.LogiSysUser;
import com.piggy.logi.sys.api.factory.RemoteLogiRoleMenuFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 角色菜单服务
 *
 * @author shark
 */
@FeignClient(contextId = "remoteLogiRoleMenuService", value = ServiceNameConstants.SYSTEM_LOGI_SERVICE, fallbackFactory = RemoteLogiRoleMenuFallbackFactory.class)
public interface RemoteLogiRoleMenuService {

    @GetMapping("/logi/role/getAssignees")
    List<LogiSysUser> getAssignees(@RequestParam("menuIds")  List<String> menuIds, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
